/*
 sortinggameTests.m
 Date Created: March 12, 2010
 
 Author: Frank Lau <flaua@sfu.ca>
 
 Copyright (C) 2010 Green-Power
 
 URL: http://code.google.com/p/green-power
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
 $Id$
 */

#import "sortinggameTests.h"
#import "../Classes/sortinggame/SGRecyclableType.h"
#import "../Classes/sortinggame/SGBinType.h"
#import "../Classes/sortinggame/SGSortingGameLevel.h"


@implementation sortinggameTests

#if USE_APPLICATION_UNIT_TEST     // all code under test is in the iPhone Application

#else                           // all code under test must be linked into the Unit Test bundle

- (void) testListOfficialTypes {
	NSArray* sgrecyclableType = [SGRecyclableType listOfficialTypes]; 
	
	//check cans
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:0]).uniqueName == @"cans", @"Strings should be the same" );
  STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:0]).image objectAtIndex:0] == @"SGcans.png", @"Strings should be the same" );
  STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:0]).image objectAtIndex:1] == @"SGcans2.png", @"Strings should be the same" );
  STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:0]).image objectAtIndex:2] == @"SGcans3.png", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:0]).name == @"Cans", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:0]).depositValue == 5, @"Integers should be the same" );
	
	//check clearPlasticSmall
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:1]).uniqueName == @"clearPlasticSmall", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:1]).image objectAtIndex:0] == @"SGclearPlasticSmall.png", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:1]).image objectAtIndex:1] == @"SGclearPlasticSmall2.png", @"Strings should be the same" );
  STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:1]).image objectAtIndex:2] == @"SGclearPlasticSmall3.png", @"Strings should be the same" );
  STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:1]).name == @"Clear Plastic (Small)", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:1]).depositValue == 5, @"Integers should be the same" );
	
	//check clearPlasticLarge
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:2]).uniqueName == @"clearPlasticLarge", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:2]).image objectAtIndex:0] == @"SGclearPlasticLarge.png", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:2]).image objectAtIndex:1] == @"SGclearPlasticLarge2.png", @"Strings should be the same" );
  STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:2]).image objectAtIndex:2] == @"SGclearPlasticLarge3.png", @"Strings should be the same" );
  STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:2]).name == @"Clear Plastic (Large)", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:2]).depositValue == 20, @"Integers should be the same" );
	
	//check pouches
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:3]).uniqueName == @"pouches", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:3]).image objectAtIndex:0] == @"SGpouches.png", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:3]).name == @"Pouches", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:3]).depositValue == 5, @"Integers should be the same" );
	
	//check tetraPakSmall
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:4]).uniqueName == @"tetraPakSmall", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:4]).image objectAtIndex:0] == @"SGtetraPakSmall.png", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:4]).name == @"Tetra Pak (Small)", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:4]).depositValue == 5, @"Integers should be the same" );
	
	//check tetraPakLarge
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:5]).uniqueName == @"tetraPakLarge", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:5]).image objectAtIndex:0] == @"SGtetraPakLarge.png", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:5]).name == @"Tetra Pak (Large)", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:5]).depositValue == 20, @"Integers should be the same" );
	
	//check otherPlasticSmall
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:6]).uniqueName == @"otherPlasticSmall", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:6]).image objectAtIndex:0] == @"SGotherPlasticSmall.png", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:6]).name == @"Other Plastic (Small)", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:6]).depositValue == 5, @"Integers should be the same" );
	
	//check otherPlasticLarge
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:7]).uniqueName == @"otherPlasticLarge", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:7]).image objectAtIndex:0] == @"SGotherPlasticLarge.png", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:7]).name == @"Other Plastic (Large)", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:7]).depositValue == 20, @"Integers should be the same" );
	
	//check gableSmall
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:8]).uniqueName == @"gableSmall", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:8]).image objectAtIndex:0] == @"SGgableSmall.png", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:8]).name == @"Gable (Small)", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:8]).depositValue == 5, @"Integers should be the same" );
	
	//check gableLarge
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:9]).uniqueName == @"gableLarge", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:9]).image objectAtIndex:0] == @"SGgableLarge.png", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:9]).name == @"Gable (Large)", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:9]).depositValue == 20, @"Integers should be the same" );
	
	//check glassSmall
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:10]).uniqueName == @"glassSmall", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:10]).image objectAtIndex:0] == @"SGglassSmall.png", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:10]).name == @"Glass (Small)", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:10]).depositValue == 5, @"Integers should be the same" );
  
	//check glassLarge
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:11]).uniqueName == @"glassLarge", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:11]).image objectAtIndex:0] == @"SGglassLarge.png", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:11]).name == @"Glass (Large)", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:11]).depositValue == 20, @"Integers should be the same" );
	
	//check garbage
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:12]).uniqueName == @"garbage", @"Strings should be the same" );
	STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:12]).image objectAtIndex:0] == @"SGfish.png", @"Strings should be the same" );
  STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:12]).image objectAtIndex:1] == @"SGbananaPeel.png", @"Strings should be the same" );
  STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:12]).image objectAtIndex:2] == @"SGbananaPeel2.png", @"Strings should be the same" );
  STAssertTrue([((SGRecyclableType*)[sgrecyclableType objectAtIndex:12]).image objectAtIndex:3] == @"SGoldBoot.png", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:12]).name == @"Garbage", @"Strings should be the same" );
	STAssertTrue(((SGRecyclableType*)[sgrecyclableType objectAtIndex:12]).depositValue == 0, @"Integers should be the same" );
}

- (void) testNumRecyclableTypes{
  NSArray* sgrecyclableType = [SGRecyclableType listOfficialTypes];
	STAssertTrue( [sgrecyclableType count] == 13, @"Array should have 12 elements");
}



- (void) testListBinTypes{
	NSArray* sgBinType = [SGBinType listBinTypes]; 
	
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:0]).uniqueName == @"cansBin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:0]).name == @"Cans Bin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:0]).image == @"SGcansBin.png", @"Strings should be the same");
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:0]).acceptsItems objectAtIndex:0] == @"cans", @"Strings should be the same");	
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:0]).acceptsItems count] == 1, @"Count is wrong");
	
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:1]).uniqueName == @"clearPlasticBin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:1]).name == @"Clear Plastic Bin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:1]).image == @"SGclearPlasticBin.png", @"Strings should be the same");
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:1]).acceptsItems objectAtIndex:0] == @"clearPlasticLarge", @"Strings should be the same");
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:1]).acceptsItems objectAtIndex:1] == @"clearPlasticSmall", @"Strings should be the same");	
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:1]).acceptsItems count] == 2, @"Count is wrong");
	
	
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:2]).uniqueName == @"pouchesBin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:2]).name == @"Pouches Bin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:2]).image == @"SGpouchesBin.png", @"Strings should be the same");
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:2]).acceptsItems objectAtIndex:0] == @"pouches", @"Strings should be the same");	
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:2]).acceptsItems count] == 1, @"Count is wrong");
	
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:3]).uniqueName == @"tetraPakBin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:3]).name == @"Tetra Pak Bin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:3]).image == @"SGtetraPakBin.png", @"Strings should be the same");
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:3]).acceptsItems objectAtIndex:0] == @"tetraPakSmall", @"Strings should be the same");	
  STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:3]).acceptsItems objectAtIndex:1] ==@"tetraPakLarge", @"Strings should be the same");	
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:3]).acceptsItems count] == 2, @"Count is wrong");
	
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:4]).uniqueName == @"otherPlasticBin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:4]).name == @"Other Plastic Bin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:4]).image == @"SGotherPlasticBin.png", @"Strings should be the same");
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:4]).acceptsItems objectAtIndex:0] == @"otherPlasticSmall", @"Strings should be the same");	
  STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:4]).acceptsItems objectAtIndex:1] == @"otherPlasticLarge", @"Strings should be the same");	
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:4]).acceptsItems count] == 2, @"Count is wrong");
	
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:5]).uniqueName == @"gableBin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:5]).name == @"Gable Bin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:5]).image == @"SGgableBin.png", @"Strings should be the same");
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:5]).acceptsItems objectAtIndex:0] == @"gableSmall", @"Strings should be the same");	
  STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:5]).acceptsItems objectAtIndex:1] == @"gableLarge", @"Strings should be the same");	
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:5]).acceptsItems count] == 2, @"Count is wrong");
	
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:6]).uniqueName == @"glassBin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:6]).name == @"Glass Bin", @"Strings should be the same");
	STAssertTrue(((SGBinType*)[sgBinType objectAtIndex:6]).image == @"SGglassBin.png", @"Strings should be the same");
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:6]).acceptsItems objectAtIndex:0] == @"glassSmall", @"Strings should be the same");	
  STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:6]).acceptsItems objectAtIndex:1] == @"glassLarge", @"Strings should be the same");	
	STAssertTrue([((SGBinType*)[sgBinType objectAtIndex:6]).acceptsItems count] == 2, @"Count is wrong");
	
	
}

- (void) testNumBinTypes{
	NSArray* sgBinType = [SGBinType listBinTypes]; 
	STAssertTrue( [sgBinType count] == 7, @"Array should have 7 elements");
}

- (void) testListItemsInLevel{
	
	SGSortingGameLevel* sortinggameleveltest = [[SGSortingGameLevel alloc] initWithLevel:1];
	NSArray* itemsInLevel = [sortinggameleveltest listItemsInLevel];
	
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:0]).uniqueName == @"cans", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:1]).uniqueName == @"clearPlasticSmall", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:2]).uniqueName == @"clearPlasticLarge", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:3]).uniqueName == @"pouches", @"Strings should be equal");
	STAssertTrue( [itemsInLevel count] == 4, @"Incorrect number of elements in array");
	[sortinggameleveltest  release];
	
	
	sortinggameleveltest = [[SGSortingGameLevel alloc] initWithLevel:2];
	itemsInLevel = [sortinggameleveltest listItemsInLevel];
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:0]).uniqueName == @"cans", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:1]).uniqueName == @"clearPlasticSmall", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:2]).uniqueName == @"clearPlasticLarge", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:3]).uniqueName == @"pouches", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:4]).uniqueName == @"tetraPakSmall", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:5]).uniqueName == @"tetraPakLarge", @"Strings should be equal");
	STAssertTrue( [itemsInLevel count] == 6, @"Incorrect number of elements in array");
	[sortinggameleveltest  release];
	
	sortinggameleveltest = [[SGSortingGameLevel alloc] initWithLevel:3];
	itemsInLevel = [sortinggameleveltest listItemsInLevel];
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:0]).uniqueName == @"cans", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:1]).uniqueName == @"clearPlasticSmall", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:2]).uniqueName == @"clearPlasticLarge", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:3]).uniqueName == @"pouches", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:4]).uniqueName == @"tetraPakSmall", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:5]).uniqueName == @"tetraPakLarge", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:6]).uniqueName == @"otherPlasticSmall", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:7]).uniqueName == @"otherPlasticLarge", @"Strings should be equal");
  STAssertTrue([itemsInLevel count] == 8,  @"Incorrect number of elements in array");
	[sortinggameleveltest  release];
	
	
	sortinggameleveltest = [[SGSortingGameLevel alloc] initWithLevel:4];
	itemsInLevel = [sortinggameleveltest listItemsInLevel];
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:0]).uniqueName == @"cans", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:1]).uniqueName == @"clearPlasticSmall", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:2]).uniqueName == @"clearPlasticLarge", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:3]).uniqueName == @"pouches", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:4]).uniqueName == @"tetraPakSmall", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:5]).uniqueName == @"tetraPakLarge", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:6]).uniqueName == @"otherPlasticSmall", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:7]).uniqueName == @"otherPlasticLarge", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:8]).uniqueName == @"gableSmall", @"Strings should be equal");
	STAssertTrue([itemsInLevel count] == 9,  @"Incorrect number of elements in array");
	[sortinggameleveltest  release];
	
	
	sortinggameleveltest = [[SGSortingGameLevel alloc] initWithLevel:5];
	itemsInLevel = [sortinggameleveltest listItemsInLevel];
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:0]).uniqueName == @"cans", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:1]).uniqueName == @"clearPlasticSmall", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:2]).uniqueName == @"clearPlasticLarge", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:3]).uniqueName == @"pouches", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:4]).uniqueName == @"tetraPakSmall", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:5]).uniqueName == @"tetraPakLarge", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:6]).uniqueName == @"otherPlasticSmall", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:7]).uniqueName == @"otherPlasticLarge", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:8]).uniqueName == @"gableSmall", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:9]).uniqueName == @"gableLarge", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:10]).uniqueName == @"glassSmall", @"Strings should be equal");
	STAssertTrue([itemsInLevel count] == 11,  @"Incorrect number of elements in array");
	[sortinggameleveltest  release];
	
	
	//subarray only has 12 items so will produce an error
	sortinggameleveltest = [[SGSortingGameLevel alloc] initWithLevel:6];
	itemsInLevel = [sortinggameleveltest listItemsInLevel];
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:0]).uniqueName == @"cans", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:1]).uniqueName == @"clearPlasticSmall", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:2]).uniqueName == @"clearPlasticLarge", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:3]).uniqueName == @"pouches", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:4]).uniqueName == @"tetraPakSmall", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:5]).uniqueName == @"tetraPakLarge", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:6]).uniqueName == @"otherPlasticSmall", @"Strings should be equal");
  STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:7]).uniqueName == @"otherPlasticLarge", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:8]).uniqueName == @"gableSmall", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:9]).uniqueName == @"gableLarge", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:10]).uniqueName == @"glassSmall", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:11]).uniqueName == @"glassLarge", @"Strings should be equal");
	STAssertTrue(((SGRecyclableType*)[itemsInLevel objectAtIndex:12]).uniqueName == @"garbage", @"Strings should be equal");
	STAssertTrue([itemsInLevel count] == 13,  @"Incorrect number of elements in array");
  [sortinggameleveltest  release];
	
	
}


#endif


@end
